<% unless @users.empty? %>
<table summary="Users List" id="user_index_table">
<thead>
  <tr>
    <th scope="col">check</th>
    <!-- <th scope="col">id</th> -->
    <th scope="col">Cn Name</th>
    <th scope="col">English Name</th>
    <th scope="col">Ext</th>
    <th scope="col">Department</th>
    <th scope="col">Points<img id="spinner2" src="/images/spinner.gif" style="display:none"/></th>
   
  </tr>
</thead>
<tbody>

  <% for user in @users %>
      
    <tr id="<%= user.id %>">
        <td><%= link_to_remote( image_tag("/images/bullet_down.png",:border => 0,:alt =>"uncheck this user"),:confirm => "Are you sure you want to delete?",
        :url =>{:action => :delete_users,:id => @project_id,:user_id => user.id},:method =>:get) %></td>
      <!-- <td><%#= user.employee_id %></td> -->
      <td style="text-align: left; padding-left: 15px;">
		<%= image_tag("/images/male.gif",:title =>"male",:alt =>"male",:style => "text-align:left;padding-right: 15px;") if user.gender.downcase == 'male' %>
		<%= image_tag("/images/female.gif",:title =>"female",:alt =>"female",:style => "text-align:left;padding-right: 15px;") if user.gender.downcase == 'female' %>
		<%= link_to user.chinese_name,user_path(user) %></td>
      <td><%= link_to user.english_name,user_path(user) %></td>
      <td><%= user.ext %></td>
      <td><%= user.department.name %></td>
      <td align="left">
        
        <% form_remote_tag :url => {:action =>:edit_point,:id =>@project_id,:user_id =>user.id } ,:method =>:get,
  :before => "Element.show('spinner2');",
  :complete => "Element.hide('spinner2');" do %>
    <div id="<%= "div_#{user.id}" %>">
      <%= text_field_tag :point,user.projectusers.find_by_project_id(@project_id).point,:size => 10,:id => "point_#{user.id}" %>
       <input type="image" src="/images/save.jpeg" name="submit" id="submit"/>
           </div>
   
   
    </td>
       <% end %>

          
     <%#= user.projectusers.collect {|pu| pu.point}.max %><%#= user.projectusers.find_by_project_id(@project_id).point %>  
   </tr>


  <% end %>
<% else %>
  <h1>no user</h1>
<% end %>
</tbody>
</table>
 
